// Outline for a logger for Darn 3D 
//Code taken from http://www.exampledepot.com/egs/java.util.logging/LogFile.html
//Fall 2011 
//CS424 Software Engineering 
 

import java.io.*;
import java.util.logging.*;

package com.mycompany; //change to whatever package
public class BasicLogging {
    public static void main(String[] args) {
        // Get a logger; the logger is automatically created if
        // it doesn't already exist
        Logger logger = Logger.getLogger("com.mycompany.BasicLogging");

        // Log a few message at different severity levels
        logger.severe("Warning: Severe Error");
        logger.warning("Warning, error");
        logger.info("Information");
        logger.config("my configuration message");
        logger.fine("my fine message");
        logger.finer("my finer message");
        logger.finest("my finest message");
     

try {
    // Create a file handler that write log record to a file called my.log
    FileHandler handler = new FileHandler("my.log");

    // Add to the desired logger
    Logger logger = Logger.getLogger("com.mycompany");
    logger.addHandler(handler);
} catch (IOException e) {
}
try {
    // Create an appending file handler
    boolean append = true;
    FileHandler handler = new FileHandler("my.log", append);

    // Add to the desired logger
    Logger logger = Logger.getLogger("com.mycompany");
    logger.addHandler(handler);
} catch (IOException e) {

}
}
}